home *** CD-ROM | disk | FTP | other *** search
/ CD Ware Multimedia 1995 May / cd Ware (Juegos) Epimundo.iso / DOS / C / LSAM.ZIP / LSAM.H < prev    next >
Encoding:
C/C++ Source or Header  |  1987-12-06  |  2.3 KB  |  47 lines

  1. /*
  2.     lsam.h       Lydian Software Access Method
  3.            standard header file for LSAM system use.
  4.            data structures and other preprocessor definitions
  5.            required for system use.
  6.     Copyright (C) Lydian Software, 1987
  7. */
  8. #define  EOS '\0'                      /* END OF STRING CONSTANT */
  9. #define  YES   1               /* yes/no 'boolean' switch values */
  10. #define  NO    0
  11.            /* SYSTEM RETURN CODE VALUES: */
  12. #include "lsrcodes.h"
  13.            /* SYSTEM KEY LENGTH, PATH STRING LIMITS: */
  14. #include "lslimits.h"
  15.            /* DATA TYPE DEFINITIONS */
  16. typedef unsigned int  UINT;           /* shorthand */
  17. typedef unsigned char UCHAR;
  18. typedef unsigned char BOOLEAN;
  19. typedef unsigned long ULONG;
  20. typedef struct {               /* BASE FILE PARAMETERS STRUCTURE */
  21.     UCHAR fill[1];
  22. } *LSBFPP;                   /* POINTER type */
  23.  
  24.     /* ls_open() PARM FILE SWITCH OPTIONS - values for    'env_or_name' switch */
  25. #define PARM_ENV_VAR  YES  /* string is an ENV VAR holding parm file pathname */
  26. #define PARM_NAME     NO   /* string IS parm file pathname */
  27.  
  28.     /* ls_startbr() OPTIONS - values for 'stype' start type switch */
  29. #define GTEQ   0       /* request positioning at next greater or equal key*/
  30. #define EQUAL  1       /* request positioning at equal key only (exact) */
  31.  
  32.            /* SYSTEM REQUEST FUNCTION DECLARATIONS */
  33.  
  34. void ls_bldixkey(LSBFPP,UINT,UCHAR *); /* build key string service for non-contiguous keys */
  35. int  ls_is_ix_new(LSBFPP,UINT),      /* returns YES if selected ix created by this run, else NO */
  36.      ls_bldindx(LSBFPP,UINT),         /* build index file for given base file */
  37.      ls_startbr(LSBFPP,UINT,UCHAR *,UCHAR),  /* (re)set current record pointer for seq read */
  38.      ls_read(LSBFPP,UINT,UCHAR *),   /* 'random' read (by key) */
  39.      ls_readnext(LSBFPP,UINT),         /* sequential read (next) logical record, given index */
  40.      ls_readprev(LSBFPP,UINT),         /* sequential read (prev) logical record, given index */
  41.      ls_write(LSBFPP),             /* write new record */
  42.      ls_rewrite(LSBFPP,UINT,UCHAR *),/* update existing record */
  43.      ls_delete(LSBFPP,UINT,UCHAR *), /* delete existing record */
  44.      ls_close(LSBFPP),             /* close base/index file set */
  45.      lsam(void);       /* dummy call to force linker inclusion of lsam module */
  46. LSBFPP ls_open(char *,int,UCHAR *,UCHAR *); /* open base/index file set using generated parm file */
  47.